export function useSearchListApi(query) {
    return useHttpGet("searchList", () => {
        const q = useQueryToString(query());
        return `/search${q}`
    }, {
        lazy: true
    })
}


/**
 * @description 获取可用优惠价列表
 * */
export function useCouponListApi(query) {
    return useHttpGet("CouponList", `/coupon/list`)
}


/**
 * @description  通用列表
 @param { String } type 页码
 * @param { Object } query 页码
 * @returns
 */

export function useListApi(type, query = {}) {
    let q = useQueryToString(query);
    return useHttpGet(type + "List", `/${type}/list${q}`, {
        lazy: true
    })
}


/**
 * @description  查看客
 * @param {String} type
 * @param { Object } query 页码
 * @returns
 */

export function useReadDetailApi(type, query = {}) {
    let q = useQueryToString(query);
    return useHttpGet("readDetail", `/${type}/read${q}`, {
        lazy: true
    })
}
